package cn.imnaer.service.rpc.recommend.dao;

import cn.imnaer.database.BaseDao;
import cn.imnaer.database.define.DBConstant;
import cn.imnaer.service.persistence.model.Recommend;
import cn.imnaer.service.persistence.model.consts.RECOMMENDCIRCLE;
import cn.imnaer.service.rpc.enums.EnumRecommendType;

import org.bson.BSONObject;
import org.bson.BasicBSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2015/5/7.
 */
public class RecommendDaoImpl extends BaseDao<Recommend> {

	private static final RecommendDaoImpl instance = new RecommendDaoImpl();
	private RecommendDaoImpl() {
		
	}
	public static RecommendDaoImpl getInstance() {
		return instance;
	}
	@Override
	protected String getDbSpaceName() {
		
		return  DBConstant.SPACE.RECOMMEND_INFO_SPACE;
	}

	@Override
	protected String getDbCollectionName() {
		
		return DBConstant.COLLECTION.RECOMMEND_INFO_COLLECTION;
	}

	@Override
	protected String getPrimaryKey() {
		
		return null;
	}
    public  List<Recommend>  getPerPage(int page){
    	     BSONObject matcher=new BasicBSONObject();
    	     
    	     
    	     List<Recommend>  recommendList=	this.findPerPage(matcher, null, page);
    	     return  recommendList;
    }
}
